home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / mint / mntdoc01.zoo / mintdoc / cat3 / tfork.3 < prev    next >
Encoding:
Text File  |  1993-03-03  |  1.1 KB  |  67 lines

  1.  
  2.  
  3.  
  4. TFORK(3)            MINTLIB LIBRARY FUNCTIONS            TFORK(3)
  5.  
  6.  
  7. N✓NA✓AM✓ME✓E
  8.        tfork - start a new thread
  9.  
  10. S✓SY✓YN✓NO✓OP✓PS✓SI✓IS✓S
  11.        long tfork(int (*func)(long), long arg);
  12.  
  13. D✓DE✓ES✓SC✓CR✓RI✓IP✓PT✓TI✓IO✓ON✓N
  14.        tfork starts a new thread of execution running in the same
  15.        address space. The new thread gets its own 4K  stack,  and
  16.        starts  at the address in func with arg on the stack, i.e.
  17.        as though the main program had a call  like  (*func)(arg).
  18.        The main program continues executing, with tfork returning
  19.        the process ID of the child.
  20.  
  21.        If MiNT is not active, then the child runs  to  completion
  22.        and  the  return  value  is the child's exit status; vfork
  23.        relies on this behavior.
  24.  
  25. S✓SE✓EE✓E A✓AL✓LS✓SO✓O
  26.        e✓ex✓xe✓ec✓c.✓..✓.(✓(3✓3)✓),✓, f✓fo✓or✓rk✓k(✓(3✓3)✓),✓, v✓vf✓fo✓or✓rk✓k(✓(3✓3)✓),✓, w✓wa✓ai✓it✓t(✓(3✓3)✓)
  27.  
  28. N✓NO✓OT✓TE✓ES✓S
  29.        Parent and child share the same memory; this  could  cause
  30.        problems with some library calls, notably malloc.
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64. MiNT docs 0.1              3 March 1993                         1
  65.  
  66.  
  67.